package com.example.administrator.yuejian2.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.example.administrator.yuejian2.R;
import com.example.administrator.yuejian2.bean.SharePictureBean;
import com.squareup.picasso.Picasso;
import java.util.List;
import static com.example.administrator.yuejian2.other.Url.IMAGEURL;

public class ShareAdapter extends BaseQuickAdapter<SharePictureBean,BaseViewHolder> {


    public ShareAdapter(int layoutResId, @Nullable List<SharePictureBean> data) {
        super(layoutResId, data);
    }
    @Override
    protected void convert(BaseViewHolder helper, SharePictureBean item) {
            helper.setText(R.id.share_picture_title,item.getPicture_title());
            helper.setText(R.id.sharepicture_username,item.getCount());
            helper.setText(R.id.share_picture_time,item.getPicture_time()).addOnClickListener(R.id.share_picture_time);
       Picasso.with(mContext).load(IMAGEURL+item.getPicture_pic()).into((ImageView) helper.getView(R.id.share_picture_pic));

    }

    @Override
    public int getItemCount() {

        return super.getItemCount();
    }
}

